﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Maticsoft.DAL;
using System.Data;
using Model;

namespace BLL
{
    public class TicketForStoreBO
    {
        public TicketForStoreBO(){}

        TicketForStoreDAO dao = new TicketForStoreDAO();

        /// <summary>
        /// 得到最大ID
        /// </summary>
        public int GetMaxId()
        {
            return dao.GetMaxId();
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int ID)
        {
            return dao.Exists(ID);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(TicketForStore model)
        {
            return dao.Add(model);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(TicketForStore model)
        {
            return dao.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int ID)
        {
            return dao.Delete(ID);
        }
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string IDlist)
        {
            return dao.DeleteList(IDlist);
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TicketForStore GetModel(int ID)
        {
            return dao.GetModel(ID);
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TicketForStore DataRowToModel(DataRow row)
        {
            return dao.DataRowToModel(row);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dao.GetList(strWhere);
        }

        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            return dao.GetList(Top, strWhere, filedOrder);
        }

        /// <summary>
        /// 获取记录总数
        /// </summary>
        public int GetRecordCount(string strWhere)
        {
            return dao.GetRecordCount(strWhere);
        }
    }
}
